import request from '@/utils/request'

// 查询安全代码
export function getList(query) {
  return request({
    url: '/erp/safety/list',
    method: 'get',
    params: query
  })
}
// 查询安全代码详细
export function getInfoByHazardCode(hazardCode) {
  return request({
    url: '/erp/safety/getInfoByHazardCode/' + hazardCode,
    method: 'get'
  })
}
// 新增安全代码
export function saveSafetyInstruction(data) {
  return request({
    url: '/erp/safety/add',
    method: 'post',
    data: data
  })
}
// 修改安全代码
export function editSaveSafetyInstruction(data) {
  return request({
    url: '/erp/safety/edit',
    method: 'put',
    data: data
  })
}
// 删除安全代码
export function remove(ids) {
  return request({
    url: '/erp/safety/remove/' + ids,
    method: 'delete'
  })
}

// 导出安全代码
export function exportSafe (query) {
  return request({
    url: '/erp/safety/export',
    method: 'post',
    params: query
  })
}